1. Field of the Invention
The invention is in the field of computer graphics, and more particularly to processing multiple data formats in a multi-pass graphics pipeline.
2. Description of the Related Art
Current multi-pass data processing methods are exemplified by systems and methods developed for computer graphics. This specialized field includes technology wherein data is processed through pipeline in multiple passes, wherein each pass typically performs a specific sequence of operations on the data and uses the output of one pass during processing of a subsequent pass. At the end of a first pass the output data is written to memory (local or host). During a subsequent pass the output data from the first pass is read from memory and processed.
Prior to writing the output data, the output data is converted to a predetermined format that can be read and processed by another unit in the pipeline and will pack efficiently into memory. Typically the conversion reduces the number of bits used to represent the data, so that the precision and dynamic range of subsequent calculations is likewise reduced. An advantage of reducing the number of bits used to represent the data is that less memory is required to store the data and the unit reading the data does not need to perform format conversion. A disadvantage is that subsequent calculations are performed at lower precision, consequently limiting the extent and types of algorithms that can be programmed for execution in the graphics pipeline. For example, referring now to FIG. 1, pixel data generated by a Raster Operation Unit 165 and stored in a Local Memory 135 may be read from Local Memory 135 back into Raster Operation Unit 165 or a Texturer 155. However, data written to Local Memory 135 by Raster Operation Unit 165 is not read by a Geometry Processor 140 without first being modified by Host Computer 110. This is because the format of the data output by Raster Operation Unit 165 is not a format that can be processed directly by Geometry Processor 140.
When the last pass through the Graphics Pipeline 170 has been completed, the pixel data written to Local Memory 135 by Raster Operation Unit 165 is in a fixed point format, typically four 8 bit components per pixel, red, green, blue, and alpha (RGBA). The pixel data is output to a Display 175, e.g., liquid crystal display (LCD) or cathode ray tube (CRT), via a Scanout 180. Within Scanout 180, a digital to analog converter (DAC) drives the signals required for displaying the final image on Display 175. It is desirable to display the image in a high precision format, such as floating point, to achieve a high quality image. This would require Raster Operation Unit 165 to store the pixel data in floating point format in Local Memory 135 instead of a fixed point format.
Graphics pipelines, such as Graphics Pipeline 170, typically support a limited number of data formats to reduce the complexity of conversion between formats and management of state information indicating the format of the data in the pipeline and stored in memory. A consistent format is used for data relating to a particular image, texture map, or geometry. For example, the information identifying the format for an image is stored in a table or, alternatively, stored in memory with the image data. The disadvantage of storing the format in a table is the size of the table can be limited, thereby limiting the number of images that can be stored simultaneously.
For the foregoing reasons, there is a need for a graphics system that supports high precision data formats during multi-pass rendering and floating point format output to a DAC.